package com.testmanager.testmananger.user.domain;

import com.testmanager.testmananger.foundation.domain.AbstractAuditingEntity;
import com.testmanager.testmananger.user.constants.UserJobType;
import lombok.Data;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Entity
@Table(name = "yx_user")
public class UserEntity extends AbstractAuditingEntity implements Serializable {

    private static final long serialVersionUID = -774849637756362891L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;

    @Column
    @NotNull(message = "人员名称不能为空")
    private String name;

    @Column(name = "job_type")
    @NotNull(message = "职责类型不能为空")
    @Convert(converter = UserJobTypeConvert.class)
    private UserJobType jobType;
   // private int authtype;//权限
   // private String password;


}
